<HTML><HEAD><TITLE>get_domain_as_list(?Var, -DomainList)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(ic)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>get_domain_as_list(?Var, -DomainList)</H1>
List of all the elements in the IC domain of Var
<DL>
<DT><EM>Var</EM></DT>
<DD>An IC variable or a number
</DD>
<DT><EM>DomainList</EM></DT>
<DD>The domain of Var as a list of elements.
</DD>
</DL>
<H2>Description</H2>
<P>
   If Var is an integer IC variable, DomainList will be set to an ordered
   list containing each element in the domain of Var.  If Var is a number,
   then DomainList will be set to a singleton list containing the number.</P><P>

   Currently, an out of range exception would be raised if Var is an IC 
   variable of type real.  This may change in the future.</P>

<H3>Modes and Determinism</H3><UL>
<LI>get_domain_as_list(?, -) is det
</UL>
<H3>Fail Conditions</H3>
The initial value of DomainList fails to unify with the returned value.
<H3>Exceptions</H3>
<DL>
<DT><EM>(5) type error </EM>
<DD>Var is neither an IC variable or number.
<DT><EM>(6) out of range </EM>
<DD>Var is a IC variable of type real.
</DL>
<H2>See Also</H2>
<A HREF="../../lib/ic/get_domain-2.html">get_domain / 2</A>, <A HREF="../../lib/ic/get_bounds-3.html">get_bounds / 3</A>
</BODY></HTML>
